package com.nanyang.tms.dao.company;

import com.nanyang.tms.domain.company.CompanyDO;
import com.nanyang.tms.domain.company.CompanyQuery;
import com.nanyang.tms.domain.company.CompanyVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>CompanyDao.java</p>
 * <p>Description:(企业信息表)</p>
 *
 * @author lv
 * @date 2022年11月12日 下午10:46:16
 * @Copyright Copyright (c) 2020 www.nanyang.cn Inc. All rights reserved.
 */
@Mapper
public interface CompanyDao {
    /**
     * <p>deleteByPrimaryKey</p>
     * <p>Description:(根据主键删除)</p>
     *
     * @param id
     * @return int
     */
    int deleteByPrimaryKey(Long id);

    /**
     * <p>insert</p>
     * <p>Description:(新增（所有列）)</p>
     *
     * @param record
     * @return int
     */
    int insert(CompanyDO record);
    /**
     * <p>selectByPrimaryKey</p>
     * <p>Description:(根据主键查询)</p>
     *
     * @param id
     * @return CompanyDO
     */
    CompanyDO selectByPrimaryKey(Long id);
    /**
     * <p>updateByPrimaryKeySelective</p>
     * <p>Description:(修改(选择的列))</p>
     *
     * @param record
     * @return int
     */
    int update(CompanyDO record);

    /**
     * 总数
     * @param companyQuery
     * @return
     */
    int countCompany(CompanyQuery companyQuery);

    /**
     * 列表
     * @param companyQuery
     * @return
     */
    List<CompanyVO> listCompany(CompanyQuery companyQuery);

    /**
     * <p>enableState</p>
     * <p>Description:(启用)</p>
     *
     * @param companyDO
     * @return int
     */
    int enableState(CompanyDO companyDO);

    /**
     * <p>disableState</p>
     * <p>Description:(禁用)</p>
     *
     * @param companyDO
     * @return int
     */
    int disableState(CompanyDO companyDO);
    /**
     * <p>enableState</p>
     * <p>Description:(启用)</p>
     *
     * @param companyDO
     * @return int
     */
    int passState(CompanyDO companyDO);

    /**
     * <p>disableState</p>
     * <p>Description:(禁用)</p>
     *
     * @param companyDO
     * @return int
     */
    int rejectState(CompanyDO companyDO);

    /**
     * 根据编码查询信息
     * @param companyCode
     * @return
     */
    CompanyVO selectByCode(String companyCode);

    /**
     * 检查企业名称是否存在
     * @param companyQuery
     * @return
     */
    int queryVerifyCompanyName(CompanyQuery companyQuery);
    
    
    String getCompanyLevel(String companyCode );
}